#{extends 'CRUD/layout.html' /}
#{set title:messages.get('crud.blank.title', type.modelName) /}

<div id="crudBlank" class="${type.name}">

    <h2 id="crudBlankTitle">&{'crud.blank.title', type.modelName}</h2>

    <div class="objectForm">
        #{form action:@create(), enctype:'multipart/form-data'}
        #{crud.form fields: ['person', 'documentType', 'code']}
        #{crud.custom 'person'}
        <div class="crudField crud_relation">
            <label for="person_value">
                Persona
            </label>
            <input type="text" id="person_value" readonly="readonly" value="${person.name + ' '+ person.surname}">
            <input type="hidden" name="object.person.id" id="object_person" value="${person.id}">
        </div>
        #{/crud.custom}
        #{/crud.form}
        <p class="crudButtons">
            <input type="submit" name="_save" value="&{'crud.save', type.modelName}"/>
            <input type="submit" name="_saveAndContinue" value="&{'crud.saveAndContinue', type.modelName}"/>
            <input type="submit" name="_saveAndAddAnother" value="&{'crud.saveAndAddAnother', type.modelName}"/>
        </p>
        #{/form}
    </div>

</div>